package com.jingdianjichi.subject.application.convert;

import com.jingdianjichi.subject.application.dto.SubjectAnswerDTO;
import com.jingdianjichi.subject.domain.entity.SubjectAnswerBO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 答案DTO转换器
 */
@Mapper
public interface SubjectAnswerDTOConverter {

    SubjectAnswerDTOConverter INSTANCE = Mappers.getMapper(SubjectAnswerDTOConverter.class);


    /**
     * 将BO转换为DTO
     *
     * @param subjectAnswerDTO 题目BO
     * @return 题目DTO
     */
    SubjectAnswerBO converDTOToAnswerBO(SubjectAnswerDTO subjectAnswerDTO);

    /**
     * 将BO转换为DTO
     *
     * @param subjectAnswerDTOList 题目BO
     * @return 题目DTO
     */
    List<SubjectAnswerBO> converListDTOToAnswerBO(List<SubjectAnswerDTO> subjectAnswerDTOList);

    /**
     * 将BO转换为DTO
     *
     * @param subjectAnswerBOList 题目BO
     * @return 题目DTO
     */
    List<SubjectAnswerDTO> converBoListToAnswerListDTO(List<SubjectAnswerBO> subjectAnswerBOList);
}
